#include "Vertex.h"
#include "Mesh.h"
#include "UniqueID.h"

auto nextVertexID = geo::UniqueIDGenerator<Vertex>::getNextID;

Vertex::Vertex(const Point3D& pos, Mesh* mesh)
    : _position(pos)
    , _id(nextVertexID()) {
    if (mesh) {
        mesh->addVertex(this);
    }
}